home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / comm / www / thumbnail.lha / Thumbnail / thumbnail.doc < prev    next >
Encoding:
Text File  |  1998-09-10  |  7.5 KB  |  177 lines

  1.  
  2. Thumbnail 1.9 by Sébastien Boisvert
  3. ===================================
  4.  
  5. Purpose
  6. -------
  7.  
  8. This Arexx program will create thumbnails, and an HTML document table using the 
  9. thumbnails as the images, with its links pointing to the original full image.
  10.  
  11. Requirements
  12. ------------
  13.  
  14. You'll need ARexx, and the GfxCon program from Aminet (gfx/conv/gfxcon.lha)
  15. The program also requires RexxArp library (util/rexx/ral3p3.lha) and RexxDosSupport
  16. library (util/rexx/rexxdossupport.lha)
  17.  
  18. Installation
  19. ------------
  20.  
  21. Install the required libraries in your LIBS: path. GfxCon can be put anywhere, and
  22. Thumbnail.rexx should preferably be in the REXX: path.
  23.  
  24. Usage
  25. -----
  26.  
  27. runs from the Shell, with the following AmigaDOS style arguments (defaults values
  28. listed are the original defaults):
  29.  
  30. rx thumbnail SIZEX/N SIZEY/N DEST/K PERPAGE/N RES/N PATTERN/K PICPAGE/S
  31.  
  32. SIZEX         are the sizes for the thumbnail. GfxCon proportionally scales the 
  33. SIZEY         thumbnails to fit in these resolutions. Default: 100
  34.  
  35. DEST          is the directory in which the thumbnails will be placed 
  36.               (no '/') Default: thumb
  37.  
  38. PERPAGE       this will indicate how many thumbnails to create per page. It will
  39.               create as many pages as needed to index all images. Defaults to 0,
  40.               which means to create 1 table with all images
  41.  
  42. RES           is the intended X resolution for the page ('800' for 800x600, 
  43.               '1024' for 1024x768, etc...) Default: 800
  44.  
  45. PATTERN       standard AmigaDOS pattern used to match files. Default: ~#?.(htm#?|info)
  46.  
  47. PICPAGE       if specified will create an HTML page for each picture (see below)
  48.  
  49. The program also has some setting which you may change; they are all in the 
  50. first few lines of the code:
  51.  
  52. The pattern to match/exclude; can be any standard AmigaDOS pattern
  53. The path and name of the program 'GfxCon' (you'll probably need to change this)
  54. The format for the thumbnails (gif or jpeg - must be lower case!)
  55. The border width for the table
  56. The quality for JPEG output if applicable
  57. The verbose switch to see GfxCon's output while processing images
  58. The base reference tag to include in the index/picture page(s)
  59. A header and footer string to be inserted in the index/picture page(s) (normal HTML)
  60. And last, the defaults for the different arguments.
  61.  
  62. Operation
  63. ---------
  64.  
  65. You must run the program while currently in the directory where the pictures to be 
  66. thumbnailed are.
  67.  
  68. Once given its arguments, the program will proceed to scan all files in the current 
  69. directory. It will also create the thumbnail directory if it doesn't exist.
  70.  
  71. When a file is found, it proceeds to make a thumbnail, name it to "t_<name>" plus 
  72. the proper extension, and save it to the thumbnail directory. It will then repeat 
  73. for all other matching files.
  74.  
  75. Once all the files are done, it will create the table for the HTML page putting the
  76. files in alphabetical order. It will first calculate how many thumbnails will fit 
  77. in the given  page resolution with the given thumbnail resolution. It will then 
  78. verify and adjust as necessary this number to create a table with as few blanks as 
  79. possible in the last row.
  80.  
  81. The program will  also put the thumbnail size attributes in the table to avoid
  82. 'stretching' of the thumbnail to fill the entire cell. Please note that since the
  83. maximum width of the table is calculated using the given SIZEX argument, it may 
  84. happen that the final width of the table be much smaller than the maximum width of 
  85. the window if most thumbnail are thinner than high. This may result in space on the 
  86. page in which more thumbnails could've fit. In these cases, try specifiying a higher 
  87. resolution to fill the gaps.
  88.  
  89. If PICPAGE is specified, each picture will get its own page called '<picture name>.html' that
  90. contains an image tag to show the picture (the code will also contain the proper WIDTH and
  91. HEIGHT tags) centered on the screen, and a 'Previous' and 'Next' link (where appropriate)
  92. that allows the user to step through each picture in sequence rather than having to refer
  93. back to the index each time. It will also have link(s) to the index page(s).
  94.  
  95. Once done, each table is saved as stand-alone HTML page with the name 't_index<#>.html'
  96. in the current directory, which can be directly pasted into an existing document. When
  97. creating multiple pages, each page will contain an index to the all other pages. If PICPAGE
  98. is specified, the picture link will refer to the picture's page, rather than the picture
  99. itself.
  100.  
  101. Adding pictures or changing resolution later on
  102. -----------------------------------------------
  103.  
  104. If you wish to add pictures, or remake the table for a different resolution, simply 
  105. run the script again using the same arguments as the last run, where appropriate,
  106. and the program will make thumbnails for new files, and skip those that already
  107. have thumbnails. It will then create new table page(s).
  108.  
  109. If you wish to change the resolution of the thumbnails, you'll have to erase the 
  110. thumbnail directory and have them all redone again.
  111.  
  112. Notes
  113. -----
  114.  
  115. -The program assumes all filenames contain only one extension (ie. filename.jpg,
  116.  not filename.1.jpg)
  117.  
  118. -The directory of files to be scanned should only contain graphic files. Other file
  119.  types should be excluded using the PATTERN variable. Foreign files may cause GfxCon
  120.  to crash. YOU HAVE BEEN WARNED!
  121.  
  122. -If a foreign file is encountered, and you have the verbose option on, don't concern 
  123.  yourself with possible error messages from GfxCon; the file will be skipped
  124.  
  125. -If for any reason GfxCon can't load a picture to create a thumbnail, you will see
  126.  a warning when it happens. The table will still have a cell for the picture, there
  127.  just won't be a thumbnail for it.
  128.  
  129. -If you move the location of the index file, you should add the "<BASE HREF>" 
  130.  attribute in the file in order to have the files properly referenced.
  131.  
  132.  
  133. History
  134. -------
  135. 1.0  Initial release
  136.  
  137. 1.1  Added thumbnail size attributes in index page
  138.  
  139. 1.2  Fixed bug for quality selection for JPG thumbnails
  140.      Eliminated pattern requirement - now scans all files in directory
  141.      All references in index files keep the same case as the original files (for those 
  142.      wonderful UN*X servers :)
  143.  
  144. 1.3  Better file pattern matching using RexxArp library
  145.  
  146. 1.4  Fixed bug with upper case extension in index file
  147.      Added some error checking if GfxCon couldn't process a file
  148.      Now using RexxArp for all directory functions - old way
  149.      resulted in the wrong name being associated with a file
  150.      Now also properly handles filenames containing spaces
  151.      
  152.   Thanks go to Colin Thompson for beta testing the last two revisions
  153.   
  154. 1.5  Added AmigaDOS style argument parsing
  155.  
  156. 1.6  Program now creates the table with files in alphabetical order  
  157.  
  158. 1.71 Small bug fix in usage information
  159.      Changed email and fixed file reference for required libraries
  160.      No longer need a space at the end of the GFXCON variable
  161.      Added PATTERN as optional argument for pattern matching
  162.      Usage section now displays the program's current defaults (not the original ones)
  163.      Will now exit properly if no files are available for processing
  164.      Put base reference tag line as user settable variable
  165.  
  166. 1.8  Bug fix in sorting routine (would cause duplicates and omissions in tables)
  167.      Fixed BASE HREF tag for compatibility; now blank, user option
  168.      Added Header and Footer variables to allow automatic insertion of code in page(s)
  169.      
  170. 1.9  Added PICPAGE option to create individual picture pages that can be browsed in sequence
  171.      Improved the program's grammar :)
  172.      
  173. If you notice any bugs, have any suggestions or have any modification you'd like to send,
  174. my email address is sboisvert@softhome.net
  175.  
  176. Sébastien Boisvert
  177.